import 'package:jyofservice/init/SFHomePage.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:jyofservice/kaoqin/SignList.dart';
import 'package:jyofservice/init/Welcome_page.dart';
import 'package:jyofservice/init/HomePage.dart';
import 'package:jyofservice/init/LoginPage.dart';
import 'package:jyofservice/msg/JpushMsg.dart';
import 'package:jyofservice/gongdandiaodu/GongDanDiaoDu.dart';
import 'package:jyofservice/init/Mine.dart';
import 'package:jyofservice/gongdandiaodu/DiaoDuDetail.dart';
import 'package:jyofservice/gongdandiaodu/WorkRecord.dart';
import 'package:jyofservice/fluro/fluro_convert_util.dart';
import 'package:jyofservice/gongdandiaodu/HistroyMenu.dart';
import 'package:jyofservice/gongdandiaodu/CommonUnit.dart';
import 'package:jyofservice/gongdandiaodu/DealDiaoDu.dart';
import 'package:jyofservice/tonghuajilu/CallRecord.dart';
import 'package:jyofservice/tongjichaxun/TongJiChaXun.dart';
import 'package:jyofservice/zuoxijianguan/SeatCharge.dart';
import 'package:jyofservice/jicha/JiChaInfo.dart';
//跳转到欢迎界面
var welcomeHandler = new Handler(
  handlerFunc: (BuildContext? context,Map<String,List<String>> params){
    return WelcomePage();
  }
);

//主界面
var homeHandler = new Handler(
  handlerFunc: (BuildContext? context,Map<String,List<String>> params){
    return HomePage();
  }
);
//主界面
var sfHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      return SFHomePage();
    }
);
//登录
var loginHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      return LoginPage();
    }
);

//工单调度
var gongdandiaoduHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      String? view = params["view"]?.first;
      String? title = params["title"]?.first;
      return GongDanDiaoDuPage(view: view,title: title,);
    }
);

//工单调度详情页
var diaoduDetailHandler = new Handler(
handlerFunc: (BuildContext? context, Map<String, List<Object>> params) {
  String? LSH = params["LSH"]?.first as String?;
  String? is0ffstage = params["is0ffstage"]?.first as String?;
  String? view = params["view"]?.first as String?;
  return DiaoDuDetail(LSH:LSH,is0ffstage: FluroConvertUtils.string2bool(is0ffstage),view: view,);
}
);

//工单日志
var workRecordHandler = new Handler(
    handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
      String? LSH = params["LSH"]?.first;
      return WorkRecord(LSH:LSH);
    }
);

//个人设置界面
var mineHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      return MinePage();
    }
);

//历史工单
var historyHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      String? sfbm = params["sfbm"]?.first;
      String? xqid = params["xqid"]?.first;
      return HistroyPage(sfbm: sfbm,xqid: xqid,);
    }
);

//同单元工单
var commonUnitHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      String? sfbm = params["sfbm"]?.first;
      String? xqid = params["xqid"]?.first;
      return CommonUnitPage(sfbm: sfbm,xqid: xqid,);
    }
);

//通话记录
var callRecordHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){

      return CallRecordPage();
    }
);

//统计查询
var tognJiChaXunHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){

      return TongJiChaXunPage();
    }
);

var seatChargeHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){

      return SeatChargePage();
    }
);

// var signHandler = new Handler(
//     handlerFunc: (BuildContext? context,Map<String,List<String>> params){
//
//       return SignList();
//     }
// );
var jpushMsgHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      return JpushMsg();
    }
);

var jichaInfoHandler = new Handler(
    handlerFunc: (BuildContext? context,Map<String,List<String>> params){
      return JiChaInfo();
    }
);